﻿using LayuiMvc.Util.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LayuiMvc.DataModel.Community
{
    /// <summary>
    /// 用户发布帖子模型类
    /// </summary>
   public  class UserPublishModel
    {
        /// <summary>
        /// 帖子Id
        /// </summary>
        public int PostId { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 发布时间
        /// </summary>
        public DateTime PublishTime { get; set; }

        public string PublishTimeSpan
        {
            get { return TimeSpanHelper.GetTimeSpan(PublishTime); }
        }

        /// <summary>
        /// 是否置顶
        /// </summary>
        public bool IsTop { get; set; }

        /// <summary>
        /// 是否精华
        /// </summary>
        public bool IsCream { get; set; }

        /// <summary>
        /// 回复数量
        /// </summary>
        public int ReplyCount { get; set; }

        /// <summary>
        /// 浏览数量
        /// </summary>
        public int ViewCount { get; set; }
    }
}
